package algorithm;

import cards.Card;

/**
 * 
 */

/**
 * @author Tor Bittmann
 * 
 */
public class HiLoAlgorithm extends CountingAlgorithm {
	public HiLoAlgorithm() {
		super();
	}

	/**
	 * requires myCard != null
	 * 
	 * @param aces
	 *            must be soft ensures this.getRunningCount returns
	 *            1+(this.getRunningCount() @pre) if myCard.getValue < 7,
	 *            this.getRunningCount returns -1 + (this.getRunningCount()
	 *            @pre) if myCard.getValue>9, or this.getRunningCount returns
	 *            this.getRunningCount() @pre for all other values of
	 *            myCard.getValue()
	 */

	public void updateRunningCount(Card myCard) {

		if (myCard.getValue() < 7) {
			super.updateRunningCount(1);
		} else if (myCard.getValue() > 9) {
			super.updateRunningCount(-1);
		}
	}

}
